package com.jumi.microservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jumi.microservice.domain.Priority;
import com.jumi.microservice.domain.temp.PriorityTemp;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 权限表 Mapper 接口
 * </p>
 *
 * @author liuz
 * @since 2020-07-18
 */
public interface PriorityMapper extends BaseMapper<Priority> {

    /**
     * 获取子菜单及孙子菜单
     * @param id 父id
     * @return
     */
    List<PriorityTemp> selectChildren(@Param("id") Long id);

    /**
     * 根据登录用户获取菜单
     * @param id 用户id
     * @return
     */
    List<Priority> authorizeList(@Param("id") Long id);
}
